package com.jun2yah.quiz;

import android.content.*;

public class Preferences {
	static public void setCount(Context context, String count) {
		SharedPreferences.Editor editor = context.getSharedPreferences(context.getPackageName(), 0).edit();
		editor.putString("count", count);
		editor.commit();
	}
	
	static public String getCount(Context context) {
		SharedPreferences pref = context.getSharedPreferences(context.getPackageName(), 0);
		return pref.getString("count", "");
	}
	
	static public void removeCount(Context context, String count) {
		SharedPreferences.Editor editor = context.getSharedPreferences(context.getPackageName(), 0).edit();
		editor.remove(count);
		editor.commit();
	}
	
	static public void removeAllCount(Context context) {
		SharedPreferences.Editor editor = context.getSharedPreferences(context.getPackageName(), 0).edit();
		editor.clear();
		editor.commit();
	}
}